home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
commands
/
dd.c.D
< prev
next >
Wrap
Text File
|
1990-07-25
|
1KB
|
77 lines
*** /tmp/,RCSt1022131 Wed Jul 25 13:41:05 1990
--- dd.c Mon Jul 23 16:37:52 1990
***************
*** 1,4 ****
! #include "stdio.h"
! #include "signal.h"
#define EOS '\0'
--- 1,9 ----
! /* dd - disk dumper */
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <stdio.h>
+
#define EOS '\0'
***************
*** 71,73 ****
int flag = 0;
! int cnull(), ibm(), null(), over();
int ifd, ofd, ibc;
--- 76,79 ----
int flag = 0;
! int cnull(), ibm(), null();
! void over();
int ifd, ofd, ibc;
***************
*** 104,110 ****
- over()
- {
- statistics();
- exit(0);
- }
--- 110,111 ----
***************
*** 209,211 ****
convert = cnull;
! if ((ifd = ((ifilename) ? open(ifilename, 0) : dup(0))) < 0) {
fprintf(stderr, "dd: cannot open %s\n",
--- 210,212 ----
convert = cnull;
! if ((ifd = ((ifilename) ? open(ifilename, O_RDONLY) : dup(0))) < 0) {
fprintf(stderr, "dd: cannot open %s\n",
***************
*** 247,249 ****
for (; nseek; nseek--)
! lseek(ofd, (long) obs, 1);
outputall:
--- 248,250 ----
for (; nseek; nseek--)
! lseek(ofd, (long) obs, SEEK_CUR);
outputall:
***************
*** 266,268 ****
if (ibuf[i] != 0)
! ibs = i;
statistics();
--- 267,269 ----
if (ibuf[i] != 0)
! ibc = i;
statistics();
***************
*** 338,339 ****
--- 339,346 ----
}
+ }
+
+ void over()
+ {
+ statistics();
+ exit(0);
}